Loading TOC...

PUT /v1/config/properties/{property-name}

Summary

Set the value of the MarkLogic REST API instance configuration property named by {property-name}.

URL Parameters
format? You can use this parameter as a fallback to the request Content-type header. The Content-type header takes precedence over format in most cases; for details, see Controlling Input and Output Content Type in the REST Application Developer's Guide. Accepted values: json or xml.
Request Headers
Content-Type? The MIME type of the data in the request body, one of application/xml or application/json.

Response

Upon success, MarkLogic Server responds with status 204 (Updated).

Required Privileges

This operation requires the rest-admin role, or the following privileges:

http://marklogic.com/xdmp/privileges/rest-admin

http://marklogic.com/xdmp/privileges/rest-writer

http://marklogic.com/xdmp/privileges/rest-reader

Usage Notes

For a list of property names, see GET /v1/config/properties/{property-name}.

For more details, see Configuring Instance Properties in the REST Application Developer's Guide.

Example

$ cat setting
<rapi:debug xmlns:rapi="http://marklogic.com/rest-api">
  true
</rapi:debug>

$ curl --anyauth --user user:password -T ./setting -i \
    -H "Content-type: application/xml" \
    http://localhost:8000/v1/config/properties/debug

==> The "debug" property is set to true. MarkLogic Server returns
    the following headers:

HTTP/1.1 204 Updated
Server: MarkLogic
Content-Length: 0
Connection: close
  

Example

$ cat setting
{ "debug" : "true" }

$ curl --anyauth --user user:password -T ./setting -i \
    -H "Content-type: application/json" \
    http://localhost:8000/v1/config/properties/debug

==> The "debug" property is set to true. MarkLogic Server returns
    the following headers:

HTTP/1.1 204 Updated
Server: MarkLogic
Content-Length: 0
Connection: close
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.